import React from 'react';
import Tabbar from './Tabbar'
import '../style.css'

class Search extends React.Component{
    constructor(props){
        super(props)
        this.state = {
            title:"父组件传的title",
            son:""
        }
    }

    getFather=(text)=>{
        console.log(text)
        this.setState({
            son:text
        })
    }

    render(){
        return (
            <div className="">
                <Tabbar title={this.state.title} father={this.getFather}/>
                <div>{this.state.son}</div>
            </div>
        )
    }
}

export default Search